package Bestv.OTT_B2B_Replay;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

public class GetPropertiesItems {
	//public static final
	public String ProPerty_File;
	public GetPropertiesItems(String ProPerty_File){
		this.ProPerty_File=ProPerty_File;
	}
	public String ReadProperty(String key) {
		Properties prop=new Properties();
		try {
			InputStream in=new BufferedInputStream(new FileInputStream(ProPerty_File));
			prop.load(in);
			in.close();
			String value=prop.getProperty(key);
			return value;
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		return null;	
	}
	/**
	public static void main(String[] args) {
		GetPropertiesItems getPropertiesItems=new GetPropertiesItems("kafka.properties");
		String Workers_Nums=getPropertiesItems.ReadProperty("zkConnect");
		System.out.println("zkConnect:"+Workers_Nums);
	}
	**/
	
}
